package com.pmcc.core.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.pmcc.core.enums.ModuleType;
import com.pmcc.core.vo.RoleVO;
import lombok.Getter;
import lombok.Setter;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import java.util.Date;
import java.util.List;

/**
 * Created by syk on 17/7/6.
 */
@Getter
@Setter
@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
public class MenuDTO {
    private String id;

    private String name;

    private String code;

    private String icon;//图标

    private String path;//路径

    private String parentId;//上级菜单-1为一级菜单

    private Integer sortNo;//排序编号

    @Enumerated(EnumType.STRING)
    private ModuleType moduleType;//类型 0菜单 1工具栏按钮 2请求 3行操作按钮 4页面按钮

    private Boolean isLeaf;

    private List<RoleVO> roleVOList;

    private String clickEvent;

    private String createId;//创建人

    private String createName;//创建人名称

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;//创建时间

    private String modifyId;//修改人

    private String modifyName;//修改人名称

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    private Date modifyTime;//修改时间

    private String remark;//备注信息
}
